<template>
    <CommonDialog :visible="props.visible" width="700px" title="选择学校/单位" @on-close="cancel">
        <ApplySchool @cancel="cancel" @confirm="confirm" :levelLimit="props.levelLimit" :type="props.type"></ApplySchool>
    </CommonDialog>
</template>

<script setup>
import CommonDialog from '@/components/common-dialog.vue'
import ApplySchool from '@/components/improve-info/apply-school.vue'

const emit = defineEmits(['change-visible', 'update-school']);

const props = defineProps({
    visible: {
        type: Boolean,
        default: false
    },
    type: {
        type: String,
        default: 'school'
    },
    levelLimit: {
        type: [Number, String],
        default: 3
    },
    isShowRequset: {// 是否显示申请
        type: Boolean,
        default: true
    }
});


function cancel () {
    emit('change-visible', false);
}

function confirm (data) {
    cancel();
    emit('update-school', data);
}



</script>

<style lang="scss" scoped>
.improve-form {
    .max-w {
       width: 360px;
    }
}
</style>